package string;

public class RepalceAllDemo {
    public static void main(String[] args) {
        String line="abc123def456ghi78";

        line=line.replaceAll("[0-9]+","#NUMBER#");
        line=line.replaceAll("[a-zA-Z]+","***");
        System.out.println(line);
    }
}
